#include "Consumer.h"
#include "TaskQueue.h"
#include <iostream>
#include <thread>
#include <chrono>
using namespace std;

void Consumer::consume(TaskQueue &taskQue)
{
    int cnt = 20;
    while (cnt--)
    {
        int tmp = taskQue.pop();
        cout << "<<Consumer consume = " << tmp << " | " << "sizeof(taskQue) =" << taskQue.size() << endl;
        this_thread::sleep_for(chrono::milliseconds(1000));
    }
}